package com.hpeng.tml.dao.impl;

import org.springframework.stereotype.Component;

import com.hpeng.sys.model.Department;
import com.hpeng.tml.dao.DepartmentDao;
import com.hpeng.util.GenericDaoImpl;
import com.hpeng.util.Pagination;

@Component("deptDao")
public class DepartmentDaoImpl extends GenericDaoImpl<Department, String> implements
		DepartmentDao {

	public Pagination<Department> getPagination(int pageNumber,String[] hql, String[] values, String order) {
		Pagination<Department> pagination = null;
		StringBuffer stringBuffer = new StringBuffer();
		try {
			for(String str:hql){
				stringBuffer.append(str);
			}
			pagination = getPagination(stringBuffer.toString()+order, values, pageNumber);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return pagination;
	}
	
}
